<?php
//GET POST sesession cookie

//需求 要做什么
//分析 怎么做
//code
//test 做对了么

//title，content，create，author
//？replies

//1 超链接
//$id = $_GET["Id"]; // url
//SELECT * from `article` where Id=$id
//$detail;

$id = $_GET["Id"];
$sql = "SELECT * FROM `article` WHERE Id=$id ";
$conn = new mysqli("localhost","root","","myblog");
$rs = $conn->query($sql);
if($conn->error) die($conn->error);
$detail = $rs->fetch_assoc();



?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />  
    <title>第一个网页</title>
</head>
<body>
    <h3><?=$detail["Title"]?></h3>
    <div>
        <?=$detail["AuthorName"]?>编辑于
        <?=$detail["UpdateTime"]?>
    </div>
    <div><?=$detail["Content"]?></div>
    <a href="art_list.php">返回列表</a>
    
</body>
</html>

